/**
 * 
 */
package com.app.mvc.action.interceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.log4j.Logger;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;

/**
 * @author yuxk
 * 
 */
public class CornInterceptor implements HandlerInterceptor {

	private static Logger logger = Logger.getLogger(CornInterceptor.class);

	/**
	 * 
	 */
	public CornInterceptor() {
		// TODO Auto-generated constructor stub
	}

	@Override
	public void afterCompletion(HttpServletRequest arg0,
			HttpServletResponse arg1, Object arg2, Exception arg3)
			throws Exception {
		// TODO Auto-generated method stub
		logger.info("afterCompletion interceptor start...");
	}

	@Override
	public void postHandle(HttpServletRequest arg0, HttpServletResponse arg1,
			Object arg2, ModelAndView arg3) throws Exception {
		// TODO Auto-generated method stub
		logger.info("postHandle interceptor start...");

	}

	@Override
	public boolean preHandle(HttpServletRequest arg0, HttpServletResponse arg1,
			Object arg2) throws Exception {
		// TODO Auto-generated method stub
		logger.info("preHandle interceptor start...");
		logger.info(arg0.getParameter("username"));
		logger.info(arg0.getParameter("password"));
	

		return true;
	}

}
